﻿using Architecture.Api.Application.Commands.SupplierCommand;
using Architecture.Domain.Services.Interface;
using Architecture.Domian.DTO;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.SupplierHandler
{
    public class SupplierQueryCommandHandler : IRequestHandler<SupplierQueryCommand, List<PictureListDTO>>
    {
        private readonly IDeepProcessingService _deepProcessingservice;

        public SupplierQueryCommandHandler(IDeepProcessingService deepProcessingservice)
        {
            _deepProcessingservice = deepProcessingservice;
        }

        public async Task<List<PictureListDTO>> Handle(SupplierQueryCommand request, CancellationToken cancellationToken)
        {
            return await _deepProcessingservice.GetSupplierPicture(request.productionLot);
        }
    }
}
